// Mock数据服务
export const mockData = {
  // 用户相关
  user: {
    login: {
      code: 200,
      msg: '登录成功',
      data: {
        token: 'mock-token-123456',
        userInfo: {
          id: 1,
          username: 'testuser',
          nickname: '测试用户',
          email: 'test@example.com',
          avatar: 'https://via.placeholder.com/100x100'
        }
      }
    },
    register: {
      code: 200,
      msg: '注册成功',
      data: null
    },
    captcha: {
      code: 200,
      msg: '获取成功',
      data: {
        captchaImage: '',
        uuid: 'mock-uuid-123'
      }
    }
  },
  
  // 笔记相关
  notes: {
    dailyNotes: {
      code: 200,
      msg: '获取成功',
      data: {
        list: [
          {
            id: 1,
            title: '今日学习笔记',
            content: '今天学习了Vue3的组合式API，感觉很有用...',
            createTime: '2024-01-15 10:30:00',
            tags: ['Vue3', '学习'],
            category: '技术'
          },
          {
            id: 2,
            title: '生活随笔',
            content: '今天天气很好，心情也不错...',
            createTime: '2024-01-14 15:20:00',
            tags: ['生活', '随笔'],
            category: '生活'
          }
        ],
        total: 2
      }
    },
    documentNotes: {
      code: 200,
      msg: '获取成功',
      data: {
        list: [
          {
            id: 3,
            title: 'Vue3开发指南',
            content: 'Vue3是一个现代化的JavaScript框架...',
            createTime: '2024-01-13 09:15:00',
            tags: ['Vue3', '文档'],
            category: '技术文档'
          },
          {
            id: 4,
            title: 'TypeScript入门',
            content: 'TypeScript是JavaScript的超集...',
            createTime: '2024-01-12 14:45:00',
            tags: ['TypeScript', '入门'],
            category: '技术文档'
          }
        ],
        total: 2
      }
    },
    categories: {
      code: 200,
      msg: '获取成功',
      data: ['技术', '生活', '技术文档', '随笔']
    },
    hotTags: {
      code: 200,
      msg: '获取成功',
      data: [
        { name: 'Vue3', count: 15 },
        { name: 'TypeScript', count: 12 },
        { name: '学习', count: 8 },
        { name: '生活', count: 6 }
      ]
    }
  }
}

// 模拟API延迟
export const mockDelay = (ms: number = 500) => {
  return new Promise(resolve => setTimeout(resolve, ms))
}